<?php
if (isset($_POST["whichForm"]))
	{
		switch ($_POST["whichForm"])
		{
			case "domain":
			if (isset($_POST['domain']))
			{
				$ajoutDo = pg_query($db, "SELECT * FROM REMOVE_DOMAIN('".$_POST['domain']."' );");
			}
			break;
			
			case "concept":
			if (isset($_POST['termeV']) && isset($_POST['rem']))
			{
				if ($_POST['rem'] == "Supprimer")
				{
					$ajoutDo = pg_query($db, "SELECT * FROM REMOVE_CONCEPT ('".$_POST['termeV']."');");
				}
			}
			break;

			case "assoc":
			if (isset($_POST['assoc']))
			{	
				$asso = explode("+", $_POST['assoc']);
				echo $asso[3];
				if($asso[3] == 'f')
				{
					$asso[3]='FALSE';
				}
				else
				{
					$asso[3]='TRUE';
				}
				echo $asso[3];
				$ajoutConcept = pg_query($db, "SELECT * FROM REMOVE_ASSOCIATION ('".$asso[1]."', '".$asso[0]."', '".$asso[2]."',".$asso[3].")");
			}
			break;
		}
	}
?>
